﻿using System.Net;
using HtmlAgilityPack;

namespace Battle.Net.Infrastructure
{
    internal class HtmlFetcher
    {
        //http://eu.battle.net/wow/en/search?q=Sargy&f=wowcharacter
        //http://eu.battle.net/wow/en/search?q=Sargy&f=wowguild
        //http://eu.battle.net/wow/en/search?q=Sargy&f=wowitem
        //http://eu.battle.net/wow/en/search?q=Sargy&f=post
        //http://eu.battle.net/wow/en/search?q=Sargy&f=static
        //&sort=name
        //&dir=a


        public static HtmlDocument Fetch(string uri)
        {
            var doc = new HtmlDocument();
            var webClient = new WebClient();
            var data = webClient.DownloadString(uri);

            doc.LoadHtml(data);
            return doc;
        }
    }
}
